package indi.yuluo.dao;

import indi.yuluo.entity.discussion.Discussion;
import indi.yuluo.entity.user.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: yuluo
 * @CreateTime: 2022-08-21  20:28
 * @Description: TODO
 */
public interface DiscussMapper {
    Integer getDiscussNumByProblemId(String pid);

    List<Discussion> getDiscussInfoByPId(Long pid);

    Integer saveComments(
            @Param("uid") Long id,
            @Param("avatar") String avatar,
            @Param("pid") Long currentProblemId,
            @Param("content") String content
    );

    void updateLikesNumPlus1(Long did);

    void updateLikesNumMinus1(Long did);

    Discussion selectById(Long did);

    void deleteById(Long did);
}
